/*******************************************************************
 * Copyright (C) yel_hb-USTC, 2012                                
 *                                                                  
 * FILE NAME             :  utils.h                                 
 * PRINCIPAL AUTHOR      :  yel_hb                               
 * MODULE NAME           :  UTILS                             
 * LANGUAGE              :  C++                                      
 * TARGET ENVIRONMENT    :  windows                                   
 * DATE OF FIRST RELEASE :  2012/12/18                              
 * DESCRIPTION           :  define some useful util methods.
 ******************************************************************/

/*
 * Revision log:
 *
 * Created by yel_hb,2012/12/18
 *
 */

#ifndef UTILS_H     
#define UTILS_H    1

#include <fstream>
#include "dmvector.h"
using namespace std;

void write_data ( string fileName, vector<DMVector> vlist, vector<int> vp );

void write_data ( string fileName, vector<DMVector> vlist );

vector<DMVector> read_data ( string fileName );

vector<DMVector> read_data ( string fileName, vector<int> &vp );

vector<double> vector_mean ( vector<DMVector> vlist );

vector<double> vector_median ( vector<DMVector> vlist );

double gaussianNormal();

#endif
